home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / pcboard / gifcol40.zip / GIFCOLL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1996-09-11  |  8KB  |  387 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     Integer  INTEGER011
  30.     Integer  INTEGER012
  31.     Integer  INTEGER013
  32.     Integer  INTEGER014
  33.     Integer  INTEGER015
  34.     String   STRING001
  35.     String   STRING002
  36.     String   STRING003
  37.     String   STRING004
  38.     String   TSTRING005(11)
  39.     String   STRING006
  40.     String   STRING007
  41.     String   STRING008
  42.     String   STRING009
  43.     String   STRING010
  44.     String   STRING011
  45.     String   STRING012
  46.     String   STRING013
  47.     String   STRING014
  48.  
  49. ;------------------------------------------------------------------------------
  50.  
  51.     STRING001 = "Y"
  52.     STRING001 = YesChar()
  53.     INTEGER007 = 15
  54.     STRING007 = TempPath()
  55.     STRING008 = ""
  56.     STRING008 = GetEnv("PCBNODE")
  57.     If (STRING008 == "") STRING008 = ReadLine(PCBDat(), 91)
  58.     STRING009 = STRING008
  59.     STRING012 = Random(9999)
  60.     If (STRING012 > 9980) Then
  61.         STRING012 = 9980
  62.     Endif
  63.     STRING013 = "FLIST"
  64.     If (Exist("FLIST." + STRING008)) Then
  65.         STRING013 = "FLIST." + STRING008
  66.     Endif
  67.     STRING014 = STRING009
  68.     If (STRING009 < 100) Then
  69.         STRING014 = "0" + STRING008
  70.         If (STRING009 < 10) Then
  71.             STRING014 = "00" + STRING008
  72.         Endif
  73.     Endif
  74.     Log "GIF Collage processor command entered.", 0
  75.     If (TokCount() == 0) Then
  76.         PrintLn "@X0C Download path not specified on PPE command line."
  77.         Log "Download path not specified on GIFCOLL PPE command line.", 0
  78.         PrintLn "@X0F "
  79.         PrintLn "GIF Collage Processor Environment error - Inform your SysOp"
  80.         More
  81.         End
  82.     Endif
  83.     STRING011 = GetToken()
  84.     Cls
  85.     PrintLn " "
  86.     PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0B"
  87.     PrintLn "@X38│@X3E            GIF Collage Builder v4.0 <*> Freeware by Earl Bonser            @X3B│@X0B"
  88.     PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
  89.     If (Exist("GIFCOLL." + STRING014)) Delete "GIFCOLL." + STRING014
  90.     If (Exist(STRING013)) Goto LABEL001
  91.     Log "PCBoard control file " + STRING013 + " not found, nothing flagged.", 0
  92.     Goto LABEL007
  93.     :LABEL001
  94.     STRING004 = "FLIST" + STRING014 + ".WRK"
  95.     If (Exist(STRING004)) Delete STRING004
  96.     FOpen 1, STRING013, 0, 0
  97.     FOpen 2, STRING004, 1, 1
  98.     :LABEL002
  99.     If (Ferr(1)) Goto LABEL003
  100.     FRead 1, STRING010, 129
  101.     FWrite 2, STRING010, 129
  102.     Goto LABEL002
  103.     :LABEL003
  104.     FClose 1
  105.     FClose 2
  106.     Shell 1, INTEGER001, PPEPath() + "GIFCOL1.EXE " + STRING014 + STRING008, ""
  107.     INTEGER001 = 0
  108.     If (Exist("GIFCOLL." + STRING014)) Then
  109.         Goto LABEL004
  110.     Endif
  111.     Log "Unable to read PCBoard control file " + STRING013, 0
  112.     Log "Probable installation error.", 0
  113.     Log "Be sure that you have SHARE loaded.", 0
  114.     Goto LABEL007
  115.     :LABEL004
  116.     FOpen 1, "GIFCOLL." + STRING014, 0, 0
  117.     FGet 1, STRING010
  118.     :LABEL005
  119.     If (Ferr(1)) Goto LABEL006
  120.     INTEGER001 = INTEGER001 + 1
  121.     FGet 1, STRING010
  122.     Goto LABEL005
  123.     :LABEL006
  124.     FClose 1
  125.     If (INTEGER001 > 1) Then
  126.         INTEGER001 = INTEGER001 / 2
  127.     Endif
  128.     If (INTEGER001 > 0) Then
  129.         Goto LABEL008
  130.     Endif
  131.     :LABEL007
  132.     PrintLn " "
  133.     PrintLn "@X0EYou have not flagged any @X0CGIF@X0E files for a collage.@X0F"
  134.     PrintLn " "
  135.     DispFile HelpPath() + "GIF", 1 + 4
  136.     End
  137.     :LABEL008
  138.     If (INTEGER001 > 99) Then
  139.         PrintLn "@X0AYou have ", INTEGER001, " GIF's flagged - 99 is the max for this command."
  140.         PrintLn "The first 99 of them can be placed in collage files."
  141.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING001, 14, 1, "", 8192 + 16384
  142.         If (Upper(STRING001) == "N") Then
  143.             Cls
  144.             End
  145.         Endif
  146.         INTEGER001 = 99
  147.     Endif
  148.     INTEGER008 = INTEGER001
  149.     PrintLn " "
  150.     PrintLn "@X0FYou have @X0A", INTEGER008, "@X0F GIF files flagged."
  151.     PrintLn " "
  152.     INTEGER013 = INTEGER008 / 9 + 1
  153.     INTEGER014 = INTEGER008 * 20 + INTEGER013 * 13
  154.     INTEGER011 = INTEGER014 / 60
  155.     If (INTEGER011 == 0) Then
  156.         INTEGER011 = 1
  157.     Endif
  158.     INTEGER012 = INTEGER011 + 1
  159.     If (INTEGER012 < 3) Then
  160.         PrintLn "@X0FIt will take 1-2 minutes to build your collage.  Please be patient."
  161.         PrintLn 
  162.     Else
  163.         If (MinLeft() < INTEGER012) Then
  164.             If (INTEGER013 < 10) Then
  165.                 PrintLn "@X0AYou do not have enough time left to build the collage file."
  166.                 Goto LABEL009
  167.             Endif
  168.             PrintLn "@X0AYou do not have enough time left to build the collage files."
  169.             :LABEL009
  170.             PrintLn "@X0F"
  171.             End
  172.         Endif
  173.         If (INTEGER001 < 10) Then
  174.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage file."
  175.         Else
  176.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage files."
  177.         Endif
  178.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING001, 14, 1, "", 8192 + 16384
  179.         If (Upper(STRING001) == "N") Then
  180.             Cls
  181.             End
  182.         Endif
  183.         Newline
  184.         PrintLn " "
  185.         PrintLn "@X0AOK, here we go....."
  186.         PrintLn " "
  187.     Endif
  188.     If (Exist("GIFDEDK.CMD")) Goto LABEL010
  189.     Copy PPEPath() + "GIFDESK.CMD", "GIFDESK.CMD"
  190.     :LABEL010
  191.     For INTEGER002 = 1 To 11
  192.         TSTRING005(INTEGER002) = "*"
  193.     Next
  194.     INTEGER015 = 1
  195.     Shell 1, INTEGER002, "ATTRIB -r " + STRING007 + "*.GIF", ""
  196.     Shell 1, INTEGER002, "DEL " + STRING007 + "*.GIF", ""
  197.     If (Exist("GIFDSK00.GIF")) Delete "GIFDSK00.GIF"
  198.     FOpen 1, "GIFCOLL." + STRING014, 0, 0
  199.     INTEGER010 = 0
  200.     INTEGER003 = GetX()
  201.     INTEGER004 = GetY()
  202.     :LABEL011
  203.     INTEGER009 = 9
  204.     If (INTEGER001 < 10) Then
  205.         INTEGER009 = INTEGER001
  206.     Endif
  207.     INTEGER001 = INTEGER001 - INTEGER009
  208.     INTEGER010 = INTEGER010 + 1
  209.     Print "@X0EPreparing @X0C", INTEGER009, "@X0E files for collage #", INTEGER010, ":@X0A"
  210.     INTEGER005 = GetX()
  211.     INTEGER006 = GetY()
  212.     For INTEGER002 = 1 To INTEGER009
  213.         FGet 1, STRING010
  214.         STRING002 = STRING010
  215.         FGet 1, STRING010
  216.         STRING003 = STRING007 + STRING010
  217.         AnsiPos INTEGER005, INTEGER006
  218.         ClrEol
  219.         Print " Frame ", INTEGER002, " is ", STRING010
  220.         Copy STRING002, STRING003
  221.     Next
  222.     AnsiPos INTEGER003, INTEGER004
  223.     ClrEol
  224.     :LABEL012
  225.     STRING012 = STRING012 + 1
  226.     STRING003 = STRING012
  227.     STRING002 = "C" + STRING009 + STRING003 + ".GIF"
  228.     INTEGER002 = 1
  229.     While (INTEGER002 < INTEGER015 + 1) Do
  230.         If (STRING002 == TSTRING005(INTEGER002)) Then
  231.             Goto LABEL012
  232.         Endif
  233.         INTEGER002 = INTEGER002 + 1
  234.     EndWhile
  235.     Print "@X0EBuilding GIF collage #", INTEGER010, " (", STRING002, ") - Please stand by....."
  236.     PrintLn " "
  237.     Shell 1, INTEGER002, PPEPath() + "GIFDESK.EXE " + STRING007 + "*.gif", ""
  238.     If (Exist("GIFDSK00.GIF")) Goto LABEL013
  239.     PrintLn "@X0AGIFDESK collage build failed - Notify your SysOp."
  240.     Log "GIFDESK did not build the collage.", 0
  241.     PrintLn " "
  242.     PrintLn "@PAUSE@"
  243.     End
  244.     :LABEL013
  245.     AnsiPos INTEGER003, INTEGER004
  246.     ClrEol
  247.     PrintLn "@X0AGIF collage #", INTEGER010, " (", STRING002, ") is ready and being moved to a download area."
  248.     INTEGER003 = GetX()
  249.     INTEGER004 = GetY()
  250.     TSTRING005(INTEGER015) = STRING002
  251.     INTEGER015 = INTEGER015 + 1
  252.     STRING003 = STRING011 + "\" + STRING002
  253.     STRING002 = "GIFDSK00.GIF"
  254.     Copy STRING002, STRING003
  255.     Delete "GIFDSK00.GIF"
  256.     Shell 1, INTEGER002, "ATTRIB -r " + STRING007 + "*.GIF", ""
  257.     Shell 1, INTEGER002, "DEL " + STRING007 + "*.GIF", ""
  258.     AnsiPos INTEGER003, INTEGER004
  259.     If (INTEGER001 > 0) Then
  260.         Goto LABEL011
  261.     Endif
  262.     FClose 1
  263.     Delete "GIFCOLL." + STRING014
  264.     STRING006 = TSTRING005(1)
  265.     INTEGER015 = 2
  266.     While (TSTRING005(INTEGER015) <> "*") Do
  267.         STRING006 = STRING006 + ";" + TSTRING005(INTEGER015)
  268.         INTEGER015 = INTEGER015 + 1
  269.         If (INTEGER015 > 11) Then
  270.             Break
  271.         Endif
  272.     EndWhile
  273.     PrintLn " "
  274.     If (INTEGER010 > 1) Then
  275.         PrintLn "@X0AYour collage files are ready to download."
  276.     Else
  277.         PrintLn "@X0AYour collage file is ready to download."
  278.     Endif
  279.     KbdStuff NoChar() + Chr(13)
  280.     KbdStuff Chr(13)
  281.     Download STRING006
  282.     INTEGER015 = 1
  283.     While (TSTRING005(INTEGER015) <> "*") Do
  284.         Delete STRING011 + "\" + TSTRING005(INTEGER015)
  285.         INTEGER015 = INTEGER015 + 1
  286.         If (INTEGER015 > 11) Then
  287.             Break
  288.         Endif
  289.     EndWhile
  290.     End
  291.  
  292. ;------------------------------------------------------------------------------
  293. ;
  294. ; Usage report (before postprocessing)
  295. ;
  296. ; ■ Statements used :
  297. ;
  298. ;    7       End
  299. ;    3       Cls
  300. ;    3       ClrEol
  301. ;    1       More
  302. ;    51      Goto 
  303. ;    61      Let 
  304. ;    3       Print 
  305. ;    33      PrintLn 
  306. ;    36      If 
  307. ;    1       DispFile 
  308. ;    4       FOpen 
  309. ;    4       FClose 
  310. ;    4       FGet 
  311. ;    6       Delete 
  312. ;    7       Log 
  313. ;    2       InputStr 
  314. ;    1       Newline
  315. ;    6       Shell 
  316. ;    2       KbdStuff 
  317. ;    4       AnsiPos 
  318. ;    1       FRead 
  319. ;    1       FWrite 
  320. ;    3       Copy 
  321. ;    1       Download 
  322. ;
  323. ;
  324. ; ■ Functions used :
  325. ;
  326. ;    2       *
  327. ;    3       /
  328. ;    58      +
  329. ;    1       -
  330. ;    6       ==
  331. ;    2       <>
  332. ;    10      <
  333. ;    2       <=
  334. ;    8       >
  335. ;    4       >=
  336. ;    29      !
  337. ;    4       &&
  338. ;    2       ||
  339. ;    2       Upper()
  340. ;    2       Ferr()
  341. ;    2       Chr()
  342. ;    1       Random()
  343. ;    1       NoChar()
  344. ;    1       YesChar()
  345. ;    1       PCBDat()
  346. ;    3       PPEPath()
  347. ;    1       ReadLine()
  348. ;    1       GetToken()
  349. ;    1       MinLeft()
  350. ;    1       GetEnv()
  351. ;    8       Exist()
  352. ;    3       GetX()
  353. ;    3       GetY()
  354. ;    1       HelpPath()
  355. ;    1       TempPath()
  356. ;    1       TokCount()
  357. ;
  358. ;------------------------------------------------------------------------------
  359. ;
  360. ; Analysis flags : Sd
  361. ;
  362. ; S - Shell to DOS ■ 5
  363. ;     This may be normal if the PPE need to execute an external command,
  364. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  365. ;     or usefull (sorting, maintenance,...). Check!
  366. ;     ■ Search for : SHELL
  367. ;
  368. ; d - Access PCBOARD.DAT ■ 2
  369. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  370. ;     for many PPE so they can find various informations on the system
  371. ;     (system paths, max number of lines in messages, ...) but it may also
  372. ;     be a way to gather vital informations.
  373. ;     ■ Search for : PCBDAT()
  374. ;
  375. ;------------------------------------------------------------------------------
  376. ;
  377. ; Postprocessing report
  378. ;
  379. ;    2       For/Next
  380. ;    3       While/EndWhile
  381. ;    22      If/Then or If/Then/Else
  382. ;    0       Select Case
  383. ;
  384. ;------------------------------------------------------------------------------
  385. ;                 AEGiS Corp - Break the routines, code against the machines!
  386. ;------------------------------------------------------------------------------
  387.